Laws of thought